/*
 * InputManager.h
 */
 
#ifndef INPUTMANAGER_H_
#define INPUTMANAGER_H_

#ifndef NULL
#define NULL 0
#endif

#include "../domain/Graph.h"
#include "../domain/Utils.h"
#include <iostream>
#include <fstream>
#include <cstdlib>
#include "../business/Logger.h"
using std::string;
using std::ifstream;
using std::cout;

const char DEFAULT_DELIMITER = ';';

/**
 * Input Manager class. Holds every functionality that has to do with input data.
 * Creates the Graph, vertex and edges from the input file.
 */
class InputManager {
private:
	ifstream* streamV;
	ifstream* streamE;
	Graph* graph;


	/**
	 * Process the input file (vertices.txt) creating the different vertex and adding them to the graph.
	 */
	void processVertexStructure ();

	/**
	 * Process the input file (aristas.txt) creating the different edges and adding them to the graph.
	 */
	void processEdgeStructure ();

public:
	/**
	 * Defaults constructor & destructor
	 */
	InputManager(ifstream* streamV, ifstream* streamE);
	virtual ~InputManager() {};

	/**
	 * Process the input files and returns a well formed graph
	 */
	Graph* createGraph();
};

#endif /*INPUTMANAGER_H_*/
